getMovieIdFromPath = function (path) {
    var reg = /(movie|tv|jiemu|anime)[\/]+(\d+)[\/]+/;
    let result = reg.exec(path);
    let movie_id = 0;
    if (result.length >= 2) {
        movie_id = result[2]
    }
    return movie_id;
};

getUrlDomain = function (mid) {
    // let uploadDomain = "tv.eotor.net";
    // if (mid >= 2000) {
    //     uploadDomain = "tv2.eotor.net";
    // }
    // return uploadDomain;
    return "sinzar-static.eotor.cn";
};

isQualityFolder = function (folderName) {
    var reg = /([\d]{3,4}p)/;
    let result = reg.exec(folderName);
    return (result && result.length >= 2);
};

module.exports = {
    getMovieIdFromPath,
    getUrlDomain,
    isQualityFolder,
};
